﻿@model MvcAtletIS.Models.Statistics

@{
    ViewBag.Title = "Editovať záznam";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
}

<h2>Editovať záznam</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Detaily</legend>

        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.CompetitorId)
        @Html.HiddenFor(model => model.CompetitionId)
        @Html.HiddenFor(model => model.DisciplineId)
        @Html.HiddenFor(model => model.Year)

        <div class="display-label">
            Pretekár
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Competitors.FullName)
        </div>

        <div class="display-label">
            Disciplína
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Disciplines.Name)
        </div>

        <div class="display-label">
            Preteky
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.StatisticsCompetitions.City)
        </div>

        <div class="display-label">
            Dátum
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.StatisticsCompetitions.Date)
        </div>

        <div class="display-label">
            Rok
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Year)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Result)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Result)
            @Html.ValidationMessageFor(model => model.Result)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.sResult)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.sResult)
            @Html.ValidationMessageFor(model => model.sResult)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Rank)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Rank)
            @Html.ValidationMessageFor(model => model.Rank)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Indoor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Indoor)
            @Html.ValidationMessageFor(model => model.Indoor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Electronic)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Electronic)
            @Html.ValidationMessageFor(model => model.Electronic)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Note)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Note)
            @Html.ValidationMessageFor(model => model.Note)
        </div>

        <p>
            <input type="submit" value="Uložiť" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na editor štatistiky", "Index", new { Years = Model.Year, ClubId = Model.Competitors.ClubId, CompetitorId = Model.CompetitorId })
</div>
